//
//  HCache.m
//  G&C
//
//  Created by dlios on 15/9/26.
//  Copyright (c) 2015年 韩. All rights reserved.
//

#import "HCache.h"

@implementation HCache

+(void)saveCacheWithPassword:(NSString *)password Type:(NSInteger)type Object:(NSDictionary *)object
{
    NSUserDefaults *data = [NSUserDefaults standardUserDefaults];
    NSString *key = [NSString stringWithFormat:@"hpd--%@--%ld",password,type];
    [data setObject:object forKey:key];
    [data synchronize];
}

+(NSDictionary *)getCacheWithPassword:(NSString *)password Type:(NSInteger)type
{
    NSUserDefaults *data = [NSUserDefaults standardUserDefaults];
    NSString *key = [NSString stringWithFormat:@"hpd--%@--%ld",password,type];
    NSDictionary *cacheDic = [data objectForKey:key];
    return cacheDic;

}
+(void)removeCacheWithPassword:(NSString *)password Type:(NSInteger)type
{
    NSUserDefaults *data = [NSUserDefaults standardUserDefaults];
    NSString *key = [NSString stringWithFormat:@"hpd--%@--%ld",password,type];
    [data removeObjectForKey:key];
}



@end
